package net.tmaize.lockview.bean;


public class Point {

    //range式半径扩大后的范围，在圆形的外接正方形内判断
    public static Point isOnPoint(float x,float y,float range,Point[][] points){
        for (int i=0;i<points.length;i++){
            for (int j=0;j<points[i].length;j++){
                if (x>=points[i][j].getX()-range && x<=points[i][j].getX()+range && y>=points[i][j].getY()-range && y<=points[i][j].getY()+range){
                    return points[i][j];
                }
            }
        }
        return null;
    }

    public float x, y;

    private int num;

    private Point() {
    }

    public Point(float x, float y, int num) {
        this.x = x;
        this.y = y;
        this.num = num;
    }

    public float getX() {
        return x;
    }

    public float getY() {
        return y;
    }

    public int getNum() {
        return num;
    }
}
